﻿using EnvDTE;
using Microsoft.Practices.RecipeFramework;
using VSSDKAssist.Assets.Actions.Base;

namespace VSSDKAssist.Recipes.CustomProject.CreateCustomProject
{
    public class ReloadProjectAction : ActionBase
    {
        [Input(Required = true)]
        public Project Project { get; set; }

        protected override void OnExecute()
        {
            this.Project.Save(this.Project.Name);
            VisualStudio.ExecuteCommand("Project.UnloadProject", string.Empty);
            VisualStudio.ExecuteCommand("Project.ReloadProject", string.Empty);
        }

        protected override void OnUndo()
        {
            //Do Nothing
        }
   }
}